@echo off
:: SET PATH=%PATH%;C:\Program Files\Binary Strokes Inc\XSD Class Generator Utility
:: XsdClassGenConsole /?

:: This was the way to do it, but here we start with source and make an xsd file instead
SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

xsd ../bin/Debug/Behemoth.SharePoint.dll /outputdir:Work /type:Behemoth.SharePoint.Data.DataSourceControlProperties
copy DataSourceControlProperties.xsd DataSourceControlProperties.xsd.bak
copy Work\Schema0.xsd DataSourceControlProperties.xsd

:: if we did it the other way round it woudl look like this
:: xsd /c /l:cs DataSourceControlProperties.xsd /out:Work /namespace:Behemoth.SharePoint.Data
:: copy DataSourceControlProperties.Designer.cs DataSourceControlProperties.Designer.cs.bak
:: copy Work\DataSourceControlProperties.cs DataSourceControlProperties.Designer.cs /y

pause